package com.qf.sys.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Copyright (C),2015-2022,北京千锋教育
 * FileName: PageUtils
 * Author: skyhappy
 * Date:2022/4/26 16:00
 */
public class PageUtils {
    private int pageNum=1;
    private int pageSize=10;

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public static Date stringToDate(String str) {
        Date dt =null;
        SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd:hh:mm:ss");
        try {
            dt=df.parse(str);
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return dt;
    }
    public static Date stringToDate2(String str) {
        Date dt =null;
        SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
        try {
            dt=df.parse(str);
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return dt;
    }
}
